package com.wzx.ptplatform.utils;

import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;

/**
 * @author 紫煦桉
 */
public class PageUtils {

    public static PageRequest initPageRequest() {
        return PageRequest.of(0, 10, Sort.Direction.DESC, "id");
    }

    public static PageRequest setPageable(Integer page, Integer limit) {
        return PageRequest.of(page, limit, Sort.Direction.DESC, "id");
    }
}
